package com.eastfair.venuebooking.api;

import com.eastfair.core.base.R;
import com.eastfair.venuebooking.vo.CustomerMainVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 客户 feign.
 *
 * @author dqq
 * @date 2023 /1/5
 */
@FeignClient(value = "venue-booking/customerMain")
public interface CustomerMainFeign {

    /**
     * 查询待同步到cms的客户.
     *
     * @return the r
     */
    @GetMapping("/cms/sync")
    R<List<CustomerMainVO>> queryForSyncCms();

    /**
     * 更新客户crm同步状态为已同步.
     *
     * @param ids the ids
     * @return the r
     */
    @PostMapping("/update/crm/sync")
    R<Boolean> updateCrmHasSync(@RequestBody List<Long> ids);
}